import requestUtil from '@/util/requestUtil'

export function doLogin(data) {
  return requestUtil({
    url: '/admin/login',
    method: 'post',
    data
  })
}

export function doGetAdminInfo(token) {
  return requestUtil({
    url: '/admin/info',
    method: 'get',
    params: { token }
  })
}

export function doLogout() {
  return requestUtil({
    url: '/admin/logout',
    method: 'post'
  })
}
